#include<bits/stdc++.h>
using namespace std;
long long n,a[100007],c[1000007];
void solve()
{
    cin>>n;
    for(int i=0;i<n;i++) cin>>a[i];
    if(n%2==0) cout<<n/2<<endl;
    else cout<<1<<endl;
}
int main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    long long T;
    cin>>T;
    while(T--)
    {
        solve();
    }
    return 0;
}
